package com.ruanyun.util;

import java.lang.reflect.Field;

public class EmptyUtil {
    public static boolean checkObjFieldIsNull(Object obj) {
        boolean flag = false;
        try {
            for(Field f : obj.getClass().getDeclaredFields()){
                f.setAccessible(true);
                if(f.get(obj) == null || "".equals(f.get(obj))){
                    flag = true;
                    return flag;
                }
            }
        }catch (Exception e){
            flag = true;
            return flag;
        }
        return flag;
    }
}
